package com.webchat.common.enums.mall;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum MallStatusEnum {

    NEW(1, "新建"),
    PENDING(2, "待审核"),
    REJECTED(3, "审核被拒绝"),
    UNPUBLISHED(4, "下线"),
    DELETED(5, "删除"),
    PUBLISHED(6, "上线"),;

    private Integer status;
    private String statusName;


    public static MallStatusEnum getByReviewStatus(MallReviewStatusEnum reviewStatusEnum) {

        if (MallReviewStatusEnum.PENDING == reviewStatusEnum) {
            return PENDING;
        } else if (MallReviewStatusEnum.APPROVED == reviewStatusEnum) {
            return PUBLISHED;
        } else if (MallReviewStatusEnum.REJECTED == reviewStatusEnum) {
            return REJECTED;
        }
        return null;
    }
}
